#pragma once

#include <string>
#include <iostream>

using namespace std;

typedef const string enum_txt[];

enum_txt enum_typ = {"Film", "Bok", "Musik", "Spel"};
enum_txt enum_media = {"DVD", "CD", "BOK", "USB"};

enum class Typ{Film, Bok, Musik, Spel};
enum class Media{DVD, CD, BOK, USB};

class MultiMedia
{
private:
	Typ typ; //film, bok, musik, spel
	Media media; // DVD, CD, BOK, USB,
	double length; //Film
	int nr_pages; //Bok
	int nr_songs; //Musik
	string main_actor; //Film
	string director; //Film
	string title; //Film, Bok, Musik, Spel
	string writer; //Bok
	int min_age; //Film, Spel
	
	int get_enum( enum_txt enum_list );
	int get_enum_stream( enum_txt enum_list, istream &stream );

public:
	MultiMedia(void);
	~MultiMedia(void);

	//Seters and Geters
	void SetTyp( string typ );
	void SetMedia( string media );
	void SetLength( double length );
	void SetNr_pages( int pages );
	void SetNr_songs( int songs );
	void SetMain_actor( string actor );
	void SetDirector( string director );
	void SetTitle( string title );
	void SetWriter( string writer );
	void SetMin_Age( int age );
	string GetTyp();
	string GetMedia();
	double GetLength();
	int GetNr_pages();
	int GetNr_songs();
	string GetMain_actor();
	string GetDirector();
	string GetTitle();
	string GetWriter();
	int GetMin_age();

	void ReadFromConsole();
	void WriteToConsole();

	friend ostream& operator <<(ostream &stream, MultiMedia &post);
	friend istream& operator >>(istream &stream, MultiMedia &post);
};

